package com.qsd.doc4jsimpple.item;

import lombok.Builder;
import lombok.Data;

import java.math.BigInteger;

/**
 * * @Author xujunxia
 * * @Date 2024-12-06 14:18
 * * @Description TODO
 * * wb-0455@dtdream.com
 **/
@Data
@Builder
public class DocLvl {


    /**
     * 级别编号的格式
     */
    private String valueTemplate;

    /**
     * 级数
     */
    private BigInteger level;
    /**
     * 级别开始编号
     */
    private BigInteger start;

    private DocLvlFormat docLvlFormat;

    public static  DocLvl getDefaultLvl(){
        return DocLvl.builder().valueTemplate("%1.").level(BigInteger.ZERO)
                .start(BigInteger.ONE)
                .docLvlFormat(new DocLvlFormat("000000",BigInteger.valueOf(24L))).build();
    }


    public DocLvlFormat getDocLvlFormat() {
        return docLvlFormat;
    }

    public DocLvl setDocLvlFormat(DocLvlFormat docLvlFormat) {
        this.docLvlFormat = docLvlFormat;
        return this;
    }

    public BigInteger getStart() {
        return start;
    }

    public DocLvl setStart(BigInteger start) {
        this.start = start;
        return this;
    }

    public BigInteger getLevel() {
        return level;
    }

    public DocLvl setLevel(BigInteger level) {
        this.level = level;
        return this;
    }

    public String getValueTemplate() {
        return valueTemplate;
    }

    public DocLvl setValueTemplate(String valueTemplate) {
        this.valueTemplate = valueTemplate;
        return this;
    }
}
